<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        table{
            border-collapse: collapse;
        }
    </style>
</head>
<a href="{% url 'kaoshi:subject_add' %}">添加科目</a>
<a href="{% url 'kaoshi:result_add' %}">添加学生</a>
<body>
<form action="{% url 'kaoshi:server' %}" method="get">
    {% csrf_token %}
    <table align="center" border="1">
        <input type="text" name="grade" required>
        <button type="submit">搜索</button>
        <tr>
        <th>学生姓名</th>
        <th>成绩</th>
        <th>科目</th>
        <th>操作</th>
    </tr>
    {% for i in pagee.object_list %}
    <tr>
        <td>{{ i.stuName }}</td>
        <td>{{ i.grade }}</td>
        <td>{{ i.sub.subName }}</td>
        <td>
            <a href="{% url 'kaoshi:delete' i.id %}">删除</a>
        </td>
    </tr>
    {% endfor %}
    </table>
</form>
<div align="center">
    {% for page in pager.page_range %}
        <a href="{% url 'kaoshi:server' page=page %}?name={{ grade }}">{{ page }}</a>
    {% endfor %}
</div>
</body>
</html>
